package cn.edu.hstc.wm.bean;

import java.util.Set;

import android.location.Location;

/**
 * 用户实体类
 * 
 */
public class User {

	/**
	 * 用户id
	 */
	private String uid;
	/**
	 * 用户名
	 */
	private String name;

	/**
	 * 用户密码
	 */
	private String password;
	/**
	 * 头像
	 */
	private String face;
	/**
	 * 性别
	 */
	private String gender;

	/**
	 * 位置
	 */
	private Location location;

	/**
	 * 是否记住用户
	 */
	private boolean isRememberMe;

	/**
	 * 加入时间
	 */
	private String jointime;

	/**
	 * 上次登录时间
	 */
	private String latestonline;

	/**
	 * 收藏的店铺
	 */
	private Set<Store> favStores;

	public User(String userName, String passwd) {
		this.name = userName;
		this.password = passwd;
	}

	public User() {
	}

	public boolean isFav(Store store) {
		return UserHelper.isFavStore(this, store);
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String string) {
		this.uid = string;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getFace() {
		return face;
	}

	public void setFace(String face) {
		this.face = face;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public Location getLocation() {
		return location;
	}

	public void setLocation(Location location) {
		this.location = location;
	}

	public boolean isRememberMe() {
		return isRememberMe;
	}

	public void setRememberMe(boolean isRememberMe) {
		this.isRememberMe = isRememberMe;
	}

	public String getJointime() {
		return jointime;
	}

	public void setJointime(String jointime) {
		this.jointime = jointime;
	}

	public String getLatestonline() {
		return latestonline;
	}

	public void setLatestonline(String latestonline) {
		this.latestonline = latestonline;
	}

	public Set<Store> getFavStores() {
		return favStores;
	}

	public void setFavStores(Set<Store> favStores) {
		this.favStores = favStores;
	}

	@Override
	public String toString() {
		return "User [uid=" + uid + ", name=" + name + ", password=" + password + ", face=" + face + ", gender=" + gender + ", location=" + location + ", isRememberMe=" + isRememberMe + ", jointime="
				+ jointime + ", latestonline=" + latestonline + ", favStores=" + favStores + "]";
	}

}
